package com.session06;

import java.util.Scanner;

public class Test2 {
    public static void main(String[] args) {
        Scanner num = new Scanner(System.in);
        int n = num.nextInt();
        System.out.println(factorial(n));
    }

    /**
     * 编写一个函数实现将参数（int）的阶乘计算出来N的阶乘等于 N* (N-1) * (N-2) * ... * 1
     *
     * @param n
     * @return
     */
    public static int factorial(int n) {
        int number = 1;
        for (int i = 1; i <= n; i++) {
            number *= i;
        }
        return number;
    }
}
